Skip to content

fix(scan): honor case sensitivity when binding filters#2500

Open
officialasishkumar wants to merge 1 commit into
apache:mainfrom
officialasishkumar:fix-scan-filter-case-sensitive
Open

fix(scan): honor case sensitivity when binding filters#2500
officialasishkumar wants to merge 1 commit into
apache:mainfrom
officialasishkumar:fix-scan-filter-case-sensitive

Conversation

@officialasishkumar
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

What changes are included in this PR?

  • Bind scan predicates using the configured TableScanBuilder case sensitivity.
  • Add regression coverage for an uppercase filter reference resolved against a lowercase schema field in a case-insensitive scan.

Are these changes tested?

  • CARGO_TARGET_DIR=/tmp/iceberg-rust-target cargo test --locked -p iceberg test_filter_with_case_insensitive_reference -- --nocapture
  • cargo fmt --all -- --check
  • git diff --check

Use the TableScanBuilder case_sensitive setting when binding scan predicates so case-insensitive scans resolve filter references consistently. Add a regression test covering an uppercase filter reference against a lowercase schema field.
Copy link
Copy Markdown
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, correctly-scoped fix. snapshot_bound_predicate was the only place still hardcoding bind(schema, true) while the actual scan predicate threaded self.case_sensitive through, so a case-insensitive scan with an uppercase reference would fail to bind. Good regression test.

One out-of-scope note: the projected-column loop above (field_id_by_name) is still case-sensitive only, so with_case_sensitive(false) covers filters but not column projection. Not this PR's concern, just flagging for a possible follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TableScanBuilder::with_case_sensitive(false) is ignored when binding scan filters

2 participants